Skip to main content

mouseClick

Type

function

Summary

Returns true if the user has clicked since the event that caused the current handler to run (or since the last time the mouseClick was checked).

Syntax

the mouseClick
mouseClick()

Description

Use the mouseClick function to keep track of clicks, or to trigger some action within a handler when the user clicks.

On systems with multi-button mice, the mouseClick function tracks mouse button 1. Clicking mouse button 2 or 3 does not affect the value of the mouseClick.

Clicks generated by the click command do not affect the mouseClick function. Only an actual click can cause the mouseClick to return true.

Checking the mouseClick function clears any previous clicks. If the user clicks, and then the mouseClick is called, it returns true. If the mouseClick is then called again (and the user hasn't clicked again meanwhile), the function returns false.

Examples

the mouseClick
wait until the mouseClick

function: clickLoc, mouse, mouseLoc

glossary: handler, mouse button, event, trigger, return

message: mouseDown, mouseUp

command: click

constant: return

control structure: function

Compatibility and Support

Introduced

LiveCode 1.0

OS

mac

windows

linux

ios

android

Platforms

desktop

server

mobile

Thank you for your feedback!

Was this page helpful?